import request from "../utils/request.js"

export function add(data) {
	return request({
		url: "/cart/add",
		method: 'post',
		data
	})
}

//购物车列表
export function getCart(data) {
	return request({
		url: "/cart/getCart",
		data
	})
}
//更新购物车
export function updateCart(data) {
	return request({
		url: "/cart/updateCart",
		method: 'post',
		data
	})
}
//更新购物车
export function delCart(data) {
	return request({
		url: "/cart/delCart",
		method: 'DELETE',
		data
	})
}
//获取下单商品
export function getOrderPreGoods(data) {
	return request({
		url: "/order/getOrderPreGoods",
		data
	})
}
//获取用户默认地址
export function getOrderDefaultAddress(data) {
	return request({
		url: "/order/getOrderDefaultAddress",
		data
	})
}

//下单
export function buyNow(data) {
	return request({
		url: "/order/buyNow",
		method: 'post',
		data
	})
}
//取消订单
export function cancelOrder(data) {
	return request({
		url: "/Order/OrderDelete",
		method: 'post',
		data
	})
}

//确认收货
export function receipt(data) {
	return request({
		url: "/order/OrderSure",
		method: 'post',
		data
	})
}
//退款
export function refund(data) {
	return request({
		url: "/order/refund",
		method: 'post',
		data
	})
}


//订单列表
export function OrderList(data) {
	return request({
		url: "/order/OrderList",
		data
	})
}
//订单详情
export function OrderDetail(data) {
	return request({
		url: "/order/OrderDetail",
		data
	})
}
//订单评论
export function Evaluate(data) {
	return request({
		url: "/order/Evaluate",
		method: 'post',
		data
	})
}

//子店管理
export function Com() {
	return request({
		url: "/user/Com"
	})
}
//子店订单管理
export function ComOrders(data) {
	return request({
		url: "/user/ComOrders",
		data
	})
}
//奖励明细
export function ComOrdersReward(data) {
	return request({
		url: "/user/ComOrdersReward",
		data
	})
}
//二维码
export function ShopImg(data) {
	return request({
		url: "/user/ShopImg",
		method: 'post',
		data
	})
}
//二维码
export function showShopImg() {
	return request({
		url: "/user/ShopImg"
	})
}
//充值
export function UserRecharge(data) {
	return request({
		url: "/user/UserRecharge",
		method: 'post',
		data
	})
}
//充值
export function getRecharge() {
	return request({
		url: "/user/UserRecharge"
	})
}
//充值管理
export function DianRecharge(data) {
	return request({
		url: "/user/DianRecharge",
		data
	})
}
//充值
export function RechargeStatus(data) {
	return request({
		url: "/user/RechargeStatus",
		method: 'post',
		data
	})
}

//充值
export function UserRechargeDian(data) {
	return request({
		url: "/user/UserRechargeDian",
		data
	})
}